package com.suixun.service;

import java.util.List;
import java.util.Map;

import com.suixun.entity.RptAlarm;
import com.suixun.entity.ext.ExtRptAlarm;
import com.suixun.entity.page.ExtRptAlarmPage;
import com.suixun.entity.page.PageRequest;
import com.suixun.entity.page.PageResultDO;
import com.suixun.service.BaseService;

public interface AlarmService extends BaseService {
 
    public ExtRptAlarm getCurrentPower(Integer peopleid,Integer objectid);
    
    public ExtRptAlarmPage getPowersPaged(Integer peopleid,Integer objectid,Integer pageIndex,Integer pageSize);
    
    public ExtRptAlarmPage getAllAlarmsPaged(Integer peopleid,Integer objectid,Integer pageIndex,Integer pageSize);
    public ExtRptAlarmPage getAttendanceAlarmsPaged(Integer peopleid,Integer objectid,Integer pageIndex,Integer pageSize);
    
    public ExtRptAlarm getLowPower(Integer peopleid,Integer objectid,Integer lowpowervalue);
    
    public Boolean deletePower(Integer peopleid,Integer objectid,Integer alarmid);
    
    public Boolean deletePowers(Integer peopleid,Integer objectid,String alarmids);
    
    public RptAlarm getSafeRegionAlarm(Integer peopleid,Integer objectid,Integer alarmid);
    
    public ExtRptAlarmPage getSafeRegionAlarmsPaged(Integer peopleid,Integer objectid,Integer pageIndex,Integer pageSize);
    
    public Boolean deleteSafeRegionAlarm(Integer peopleid,Integer objectid,Integer alarmid);
    
    public Boolean deleteSafeRegionAlarms(Integer peopleid,Integer objectid,String alarmids);

    public ExtRptAlarm getCurrentSOS(Integer peopleid,Integer objectid);
    
    public ExtRptAlarmPage getSOSsPaged(Integer peopleid,Integer objectid,Integer pageIndex,Integer pageSize);
    
    public Boolean deleteSOS(Integer peopleid,Integer objectid,Integer alarmid);
    
    public Boolean deleteSOSs(Integer peopleid,Integer objectid,String alarmids);
    
    public Boolean deleteAlarms(String type,Integer peopleid,Integer objectid,String alarmids);

    public ExtRptAlarmPage getNoticesPaged(Integer peopleid, Integer objectid,
                                Integer pageIndex, Integer pageSize);
    public ExtRptAlarmPage getCareforPage(Integer peopleid, Integer objectid, Integer pageIndex,
                                    Integer pageSize);
    
    public int getFlower(Integer objectid);


    /**
     * 根据objectid跟消息类型分页查询
     * @param objectId      学生id
     * @param pageRequest   页数
     * @param alarmType     信息类型
     *                      1SOS求助 3进范围报警  4出范围报警 20电量 21考勤到校
     *                      22考勤离校 23考勤到家  24套餐提醒 5进学校 26出学校
     *                      27续费提醒  28老师通知 29老师定位 30老师通话
     * @return
     */
    public PageResultDO<RptAlarm> queryRptAlarmPageByObjectId(Integer objectId, PageRequest pageRequest, List<Integer> alarmType);
    /**
     * 获取未读信息的 数量
     *  noticesCount    未查看的通知数量
     *  careforCount    未查看的关爱数量
     * @param objectid
     * @return
     */
    public Map<String ,Integer> getNotReadMsgCount(Integer objectid,Integer peopleid);
}
